﻿using System.Diagnostics.Contracts;
using System.Threading.Tasks;
using Microsoft.Owin;

namespace LinqToOwin
{
  [ContractClass(typeof(IRespondAsyncContract))]
  public interface IRespondAsync
  {
    Task RespondAsync(IOwinContext context);
  }

  [ContractClassFor(typeof(IRespondAsync))]
  internal abstract class IRespondAsyncContract : IRespondAsync
  {
    public Task RespondAsync(IOwinContext context)
    {
      Contract.Requires(context != null);
      Contract.Ensures(Contract.Result<Task>() != null);
      return null;
    }
  }
}